package com.aaa.controller;


import com.aaa.entity.Area;
import com.aaa.service.impl.AreaServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@Controller
@RequestMapping("area")
public class AreaController {
    @Resource
    AreaServiceImpl areaService;
    @RequestMapping("list")
    @ResponseBody
    public List<Area> list(){
        return areaService.list();
    }
}
